----------
Replication materials for Deadly Clerics
Rich Nielsen
Small Version 
Last edited: 5/10/2018
----------

This document is an abridged description of the analysis in Deadly Clerics. The goal for this smaller version of the archive is to allow access to almost all of the evidence mentioned in the book without having to engage with the data collection. For the full version and more details on data collection, see the large version of the archive (about 3.56 GB in size) and the longer readme file.  

Software: if you need the R 3.3.1 software and associated package versions to replicate the results, see the large archive.  The code that reproduces the results may not work with other versions of R or the add-on packages.

Get started:
First, download and unpack the archive. The unzipped archive is about 220 MB in size.

Table of Contents:
----------
1) Fieldwork (maps)  
2) Characteristics of cleric biographies
3) Topic models
4) Detecting jihadist clerics
5) Regressions predicting jihadism
6) Analysis of fatwa page views

----------


----------
1 Fieldwork Maps
----------

Reproduction of map of al-Azhar library from my field notes

    [original] C:\Users\Richard Nielsen\Desktop\Papers\Fatawa\cairo june 2011\field notes cairo june 2011.pdf
    [archived] E:\analysis_archive_small\fieldnote_selections\map of al-Azhar library shelves 2011.pdf

Reproduction of map of al-Azhar prayer space from my field notes

    [original] C:\Users\Richard Nielsen\Desktop\Papers\Fatawa\cairo june 2011\field notes cairo june 2011.pdf
    [archived] E:\analysis_archive_small\fieldnote_selections\al-Azhar prayer space size calculation.pdf

----------
2 Characteristics of Muslim Clerics
----------

These scripts provide and analyze the biographical materials for Chapter 4 of my book.

Most of the analysis is done in the script below. The script characterizes the clerics using topic models, k-means clustering, and word frequencies in their bios. 
This includes a cluster analysis of web sample cleric biographies (Figure 4.1), summary statistics including academic terms that clerics use (Table 4.1), 
and a map of cleric locations (Figure 4.2).

    [original] C:\Users\Richard Nielsen\Desktop\Papers\Fatawa\analysis_book\web_sample\cluster bios_25jul2016.R
    [archived] E:\analysis_archive_small\web_sample\cluster bios_25jul2016.R

Plots of cleric degrees by date of birth (Figure 4.3 in book) are made in this script:

    [original] C:\Users\Richard Nielsen\Desktop\Papers\Fatawa\analysis_book\web_sample\cleric degrees by birthdate_27jul2016.R
    [archived] E:\analysis_archive_small\web_sample\cleric degrees by birthdate_27jul2016.R



----------
3 Topic Models 
----------

These scripts gave me topics for my different Jihadist writings. 

----------
3.1 Fatwa topic analysis from islamweb.net 
----------

Data prep happened in a series of scripts originally at C:\Users\Richard Nielsen\Desktop\Papers\Fatawa\www.islamweb.net\scripts. These scripts are not included in the archive due to possible copyright issues. 

The script below creates Figure 2.1: The Topics of a Large Fatwa Corpus. Note that topics are determined by the website administrators.
 
    [original] C:\Users\Richard Nielsen\Desktop\Papers\Fatawa\www.islamweb.net\scripts\play with the data.R
    [archived] E:\analysis_archive_small\islamweb_fatwas\islamweb analysis.R


----------
3.2 Topic model of jihadist bookbag 
----------
This code creates Figure 5.1 and the materials used in Appendix B3: Assigning Topic Labels to a Topic Model of the Jihadist's Bookbag

    [original] C:\Users\Richard Nielsen\Desktop\Papers\Fatawa\analysis_diss\lda bookbag.R
    [archived] E:\analysis_archive_small\detecting_jihadist_clerics\lda bookbag.R


----------
4 Detecting jihadist clerics
----------
This script validates the jihad scores against various expert codings. Creates Figures 5.3 and 5.4 from the book.

    [archived] E:\analysis_archive_small\detecting_jihadist_clerics\validation_7jan2017.R

----------
5 Regressions predicting jihadism
----------

The code for the regressions reported in Chapter six. 

This script creates Tables 6.1-6.2 and Figures 6.1-6.2.

    [archived] E:\analysis_archive_small\web_sample\web sample analysis_7jan2017.R

----------
6 Analysis of fatwa page views
----------
Analysis of average page views for islamic way fatwas. Creates Table 6.5 in book.

    [archived] E:\analysis_archive_small\islamwayclicks\islamway clicks_7jan2017.R



